home *** CD-ROM | disk | FTP | other *** search
- Path: pwolf-mac.qualcomm.com!user
- From: pwolf@qualcomm.com (Paul I. Wolf )
- Newsgroups: comp.lang.c++
- Subject: Re: problem with inline
- Date: 8 Jan 1996 19:31:34 GMT
- Organization: Qualcomm, Inc.
- Message-ID: <pwolf-0801961131340001@pwolf-mac.qualcomm.com>
- References: <821123790snz@jprassoc.demon.co.uk>
- NNTP-Posting-Host: pwolf-mac.qualcomm.com
-
- In article <821123790snz@jprassoc.demon.co.uk>, Paul@jprassoc.demon.co.uk wrote:
-
- > Can someone help me out here ?
- >
- > I'm getting an error message from the linker when I declare one of my
- > functions as inline.
- >
- > The compiler is MSVC 1.52
- > The error message is:
- > MAIN.OBJ(c:\temp\main.cpp) : error L2029:
- > 'public: void __far __pascal vga::blt_screen(void)__far' : unresolved external
- >
- >
- > Here's a snippet of code:
- >
- > MAIN.CPP:
- > #include "vga.h"
- > // ...
- > VGA.wait_for_vsync();
- > VGA.blt_screen();
- > // ...
- >
- > VGA.H:
- > class vga
- > {
- > public:
- > // ...
- > void wait_for_vsync(void);
- > void blt_screen(void);
- >
- > private:
- > unsigned char far *video_buffer;
- > unsigned char far *double_buffer;
- > };
- >
- > VGA.CPP:
- > // ...
- > inline void vga::blt_screen(void)
- > {
- > _fmemcpy( video_buffer, double_buffer, 64000 );
- > }
- > // ...
- >
- > Thanks in advance,
- > --
- > Paul Robertson
-
-
- Declare it inline in vga.h - the compiler needs to find the first
- declaration saying inline in order to generate inline code instead of a
- call to an external function.
-